<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>农污处理系统远程监测及运维管理平台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/admin.css" media="all">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/way/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/tubiao/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/css/extension/way/iconfont.css">
    <link rel="stylesheet" href="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/huazhi/images/favicon.ico"/>
    <style>
        html,
        body,
        #container {
            width: 100%;
            height: 100%;
            color: #666
        }

        .layui-card-header .layui-a-tips{position: absolute; right: 15px; color: #01AAED;}

        .divhtml {
            line-height: 20px;
            padding: 9px 0px;
            text-align: left;
            position: relative;
            display: block;
            float: left;
            font-weight: 400;
        }

        label, .btn {
            font-size: 14px;
            margin-left: 16px;
        }

        label {
            margin-bottom: 0px;
        }

        .layui-form-label {
            width: 120px;
        }

        .amap-logo, .amap-copyright {
            display: none !important;
        }


        /* 本例子css */
        .txtMarquee-top {
            /*width: 450px;*/
            overflow: hidden;
            position: relative;
            /*border: 1px solid #ccc;*/
        }

        .txtMarquee-top .hd {
            overflow: hidden;
            height: 30px;
            background: #f4f4f4;
            padding: 0 10px;
        }

        .txtMarquee-top .hd .prev, .txtMarquee-top .hd .next {
            display: block;
            width: 9px;
            height: 5px;
            float: right;
            margin-right: 5px;
            margin-top: 10px;
            overflow: hidden;
            cursor: pointer;
            background: url("<%=request.getContextPath()%>/huazhi/images/arrow.png") no-repeat;
        }

        .txtMarquee-top .hd .next {
            background-position: 0 -140px;
        }

        .txtMarquee-top .hd .prevStop {
            background-position: -60px -100px;
        }

        .txtMarquee-top .hd .nextStop {
            background-position: -60px -140px;
        }

        /*.txtMarquee-top .bd {*/
        /*    padding: 15px;*/
        /*}*/

        .txtMarquee-top .infoList li {
            height: 24px;
            line-height: 24px;
        }

        .txtMarquee-top .infoList li .date {
            float: right;
            color: #999;
        }

        .tempWrap {
            height: 348px;
        }


    </style>
</head>

<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">快捷方式</div>
                    <div class="layui-card-body">
                        <div class="layui-carousel layadmin-carousel layadmin-shortcut">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs4">
                                        <a lay-href="<%=request.getContextPath()%>/rest/method/pathMethod?type=log&url=CCTV">
<%--                                            <i class="way icon-weibaoxitongshangchuanlogo-"></i>--%>
                                            <img src="<%=request.getContextPath()%>/images/920e983533f6014f0a4d1378a72a777.png" class="way" style="height: 114px"/>
                                            <cite>视频实时监控</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs4">
                                        <a  onclick="leader()" lay-direction="2" target="_blank">
                                            <img src="<%=request.getContextPath()%>/images/0ae0f2efb3313ff7f83c95b5a33ae95.png" class="way" style="height: 114px"/>
                                            <cite>控制驾驶舱</cite>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs4">
                                        <a lay-href="<%=request.getContextPath()%>/rest/method/pathMethod?type=inspection&url=inspectionBackstageList">
                                            <img src="<%=request.getContextPath()%>/images/c55b27ef1d46cb2cf68f2da135bb6d2.png" class="way" style="height: 114px"/>
                                            <cite>巡检保养计划</cite>
                                        </a>
                                    </li>
                                </ul>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">故障和报警</div>
                    <div class="layui-card-body">
                        <div class="layui-carousel layadmin-carousel layadmin-backlog">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>总预警数</h3>
                                            <p><cite id="smokeStateCount">0</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>本月预警</h3>
                                            <p><cite id="allOut">0</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>设备正常运行数量</h3>
                                            <p><cite id="todayIn">0</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs6">
                                        <a class="layadmin-backlog-body">
                                            <h3>设备关闭数</h3>
                                            <p><cite id="allIn">0</cite></p>
                                        </a>
                                    </li>
                                </ul>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">搜索</div>
                    <div class="layui-card-body" style="height: 186px">
                        <div class="layui-inline" style="margin-bottom: 5px;">
                            <div class="layui-input-inline">
                                <input class="layui-input search" type="text" placeholder="请输入搜索的内容">
                            </div>
                            <button class="layui-btn" type="button" id="search_btn" data-type="reload"><i class="lifechain"></i>搜索</button>
                        </div>
                        <table class="layui-hide" id="test" lay-filter="test" ></table>
                    </div>
                </div>
            </div>
            <script type="text/html" id="operation">
                <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="details">查看视频</a>
            </script>
            <div class="layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">总览信息</div>
                    <div class="layui-card-body">
                        <table class="layui-table" style="width: 100%">
                            <colgroup>
                                <col width="150">
                                <col>
                            </colgroup>
                            <tbody>
                            <tr>
                                <td style="text-align: center;">服务器状态</td>
                                <td>
                                    <div id="rightValue0"
                                         style="background-color:#83cc61 ;border-radius: 2px;color: white;display: inline-block;font-size: 14px;height:25px;line-height: 25px;text-align: center;transition: all 0.3s ease 0s;width: 100%; border-radius:20px;">
                                        正在运行
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center">4G通讯终端状态</td>
                                <td>
                                    <div id="rightValue1"
                                         style="background-color:#88bef5 ;border-radius: 2px;color: white;display: inline-block;font-size: 14px;height:25px;line-height: 25px;text-align: center;transition: all 0.3s ease 0s;width: 100%; border-radius:20px;">
                                        正在运行
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center">设备数量</td>
                                <td>
                                    <div id="rightValue2"
                                         style="background-color:#c83b3b;border-radius: 2px;color: white;display: inline-block;font-size: 14px;height:25px;line-height: 25px;text-align: center;transition: all 0.3s ease 0s;width: 100%; border-radius:20px;">
                                        10
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="text-align: center">维护次数</td>
                                <td>
                                    <div id="rightValue3"
                                         style="background-color:#ffcb3c;border-radius: 2px;color: white;display: inline-block;font-size: 14px;height:25px;line-height: 25px;text-align: center;transition: all 0.3s ease 0s;width: 100%; border-radius:20px;">
                                        51
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-col-md12">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md8">
                    <div class="layui-card">
                        <div class="layui-card-header">污水处理点分布地图  <a href="javascript:;" onclick="opens()" class="layui-a-tips"> <i class="tubiao icon-fangda"></i> </a></div>
                        <div class="layui-card-body">
                            <div id="container" style="height: 400px;"></div>
                        </div>
                    </div>
                </div>

<%--                <div class="layui-col-md4">--%>
<%--                    <div class="layui-card" style="height: 462px;">--%>
<%--                        <div class="layui-card-header">异常报警</div>--%>
<%--                        <div id="bi2" class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade"--%>
<%--                             lay-filter="LAY-index-dataview">--%>
<%--                            <div class="layui-card-body">--%>
<%--                                &lt;%&ndash;<img src="http://47.107.74.135:8080/WZSSW/jsp/huazhi/layui/images/insert.png"&ndash;%&gt;--%>
<%--                                &lt;%&ndash;style="max-width:100%;height: auto">&ndash;%&gt;--%>
<%--                                <div class="layui-carousel layadmin-carousel layadmin-dataview"--%>
<%--                                     data-anim="fade"--%>
<%--                                     lay-filter="LAY-index-normcol">--%>
<%--                                    <table class="layui-table" lay-skin="line">--%>
<%--                                        <colgroup>--%>
<%--                                            <col width="150">--%>
<%--                                            <col width="200">--%>
<%--                                            <col>--%>
<%--                                        </colgroup>--%>
<%--                                        <thead>--%>
<%--                                        <tr>--%>
<%--                                            <th style="width: 41%;">地点</th>--%>
<%--                                            <th style="width: 33.33333333%;">报警原因</th>--%>
<%--                                            <th style="width: 25%;">操作</th>--%>

<%--                                        </tr>--%>
<%--                                        </thead>--%>
<%--                                    </table>--%>
<%--                                    <div class="txtMarquee-top">--%>
<%--                                        <div class="bd">--%>
<%--                                            <ul class="infoList" id="bigUl">--%>
<%--                                                &lt;%&ndash;<li>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md4" style="padding:9px 15px;">&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2" style="padding:9px 15px;" >&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2"  style="padding:9px 15px;">&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2" style="padding:9px 15px;">&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2" style="padding:9px 15px;">&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</li>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<li>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md4" style="padding:9px 15px;">&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2" style="padding:9px 15px;" >&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<span style="color: #fff;line-height: 20px;font-size: 14px;min-height: 20px;">大法</span>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;<div class="layui-col-md2"  style="padding:9px" 1></div>&ndash;%&gt;--%>
<%--                                                &lt;%&ndash;</li>&ndash;%&gt;--%>
<%--                                            </ul>--%>
<%--                                        </div>--%>
<%--                                    </div>--%>
<%--                                </div>--%>
<%--                            </div>--%>
<%--                        </div>--%>
<%--                    </div>--%>
<%--                </div>--%>
            </div>
        </div>
    </div>

    <input type="hidden" id="flag">
    <script type="text/html" id="state">

        {{#  if(d.state=='故障'){ }}
        <img src="<%=request.getContextPath()%>/huazhi/hz/3.png" height="25px" width="25px;"> {{d.state}}
        {{#  } else { }}

        {{#  if(d.state=='低电压'){ }}
        <img src="<%=request.getContextPath()%>/huazhi/hz/1.png" height="25px" width="25px;"> {{d.state}}
        {{#  } else { }}


        {{#  } }}


        {{#  } }}
    </script>
    <script src="<%=request.getContextPath()%>/huazhi/lib/layui-v2.5.5/layui.js"></script>
    <script src="<%=request.getContextPath()%>/huazhi/js/lay-module/echarts/echarts.js"></script>
    <script src="<%=request.getContextPath()%>/huazhi/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
    <script src="<%=request.getContextPath()%>/huazhi/js/jquery.SuperSlide.2.1.3.js"></script>
    <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=b51f3248d9ad4e26ad1841c5a558f596">
    </script>
    <%--<script src="//webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>--%>

    <script>

        layui.config({
            base: '<%=request.getContextPath()%>/jsp/huazhi/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index',
            'console'
            , 'layer', 'table','test'], function () {
            var $ = layui.$
                , table = layui.table
                , form = layui.form
                , layer = layui.layer
                , laypage = layui.laypage
                , ckplayer = layui.ckplayer;

            $("#flag").val("0");

            //搜索事件
            var  active = {
                reload: function(){  //data-type='reload'
                    var search = $('.search').val();
                    table.render({
                        elem: '#test'
                        ,url:'<%=request.getContextPath()%>/rest/smoke/getLinedSearch'
                        ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                        ,height: 'full-900'
                        ,text: {
                            none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
                        }
                        ,cols: [[
                            {field:'cun', title: '地点'}
                            ,{ width:100, title: '操作',toolbar: '#operation'}
                        ]],
                        where: {
                            key: search,
                        },
                    });
                }
            };

            $('#search_btn').on('click', function(){ //搜索的id
                var type = $(this).data('type');
                active[type] ? active[type].call(this) : '';
            });



            <%--window.setInterval(function () {--%>
            <%--var flag=$("#flag").val();--%>
            <%--$.ajax({--%>
            <%--type: "post",--%>
            <%--url: "<%=request.getContextPath()%>/rest/smoke/getAlert",--%>
            <%--dataType: "json",--%>
            <%--async: false,--%>
            <%--success: function (data) {--%>
            <%--if(data==true) {--%>
            <%--if(flag=="1"){--%>

            <%--}else {--%>
            <%--layer.open({--%>
            <%--title: "报警信息",--%>
            <%--type: 2,--%>
            <%--skin: 'layui-layer-lan',--%>
            <%--content: '<%=request.getContextPath()%>/rest/method/pathMethod?type=mian&url=alert',--%>
            <%--offset: 'rb',--%>
            <%--shade: 0,--%>
            <%--area: ['25%', '100%'],--%>
            <%--shift: '2',--%>
            <%--cancel: function(index, layero) {--%>
            <%--layer.close(index)--%>
            <%--$("#flag").val("0");--%>
            <%--return false;--%>
            <%--},--%>
            <%--});--%>
            <%--$("#flag").val("1");--%>
            <%--}--%>
            <%--}--%>
            <%--}--%>
            <%--})--%>

            <%--}, 6000);--%>

            //展示已知数据


        });

        function makeTable(Lineds) {
            var ul = '<li><div class="layui-col-md5" style="padding:9px 15px;">'
            ul += '<span style="color: #000;line-height: 20px;font-size: 14px;min-height: 20px;">' + Lineds.cun + '</span></div>'
            ul += '<div class="layui-col-md4" style="padding:9px 15px;" >'
            ul += '<span style="color: #000;line-height: 20px;font-size: 14px;min-height: 20px;">' + Lineds.reason + '</span></div>'
            ul += '<div class="layui-col-md3"  style="padding:9px 15px;">'
            ul += '<a href="javascript:;" onclick=openCCTV("' + Lineds.videotid + '","' + Lineds.videoUrl + '","' + Lineds.cun + '");><span style="color: #000;line-height: 20px;font-size: 14px;min-height: 20px;">查看视频</span></a></div></li>'
            $('#bigUl').prepend(ul)


        }

        function way() {
            layui.layer.msg('当前用户没有访问权限,请联系管理人员', {time: 1000, shade: 0});
        }

        $(function () {
            var map = new AMap.Map('container', {
                resizeEnable: true,
                center: [109.509597, 18.773616],//设置地图中心点坐标
                zoom: 11, //设置地图显示的缩放级别
                viewMode: '2D',  //设置地图模式
                lang: 'zh_cn',  //设置地图语言类型

            });

            window.setTimeout(function () {
                addCloudLayer(map)
            }, 100)
        })


        function addCloudLayer(map) {
            $.ajax({
                type: "post",
                url: "<%=request.getContextPath()%>/rest/smoke/getLinedAll",
                dataType: "json",
                async: false,
                success: function (res) {
                    if (res.data != null) {
                        var Lineds = res.data
                        for (var i = 0; i < Lineds.length; i++) {
                            var oneLined = Lineds[i]
                            var redOrGreen = ''
                            if (oneLined.state == 0) {
                                redOrGreen = 'Green2.png'
                            } else {
                                redOrGreen = 'Red3.gif'
                                makeTable(oneLined)
                            }
                            var oneMaker = new AMap.Marker({
                                icon: "<%=request.getContextPath()%>/huazhi/images/point" + redOrGreen,
                                map: map,
                                position: [oneLined.jingdu, oneLined.weidu],
//                position:[116.397428, 39.90923],
                                clickable: true,
                            });
                            // 设置label标签
                            // label默认蓝框白底左上角显示，样式className为：amap-marker-label
                            oneMaker.setLabel({
                                offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量
                                content: "<div class='info'>" + oneLined.cun + "</div>", //设置文本标注内容
                                direction: 'bottom' //设置文本标注方位
                            });
                            var _onClick = function (e) {
                                details(oneLined.cun,oneLined.videotid, oneLined.videoUrl);
                            }
                            AMap.event.addListener(oneMaker, 'click', _onClick);


                        }


                    }
                }
            })

            jQuery(".txtMarquee-top").slide({
                mainCell: ".bd ul",
                autoPlay: true,
                effect: "topMarquee",
                vis: 2,
                interTime: 100
            });


            <%--var oneMaker = new AMap.Marker({--%>
            <%--icon: "<%=request.getContextPath()%>/jsp/huazhi/layui/images/pointGreen2.png",--%>
            <%--map: map,--%>
            <%--position: [109.541415,18.745042],--%>
            <%--//                position:[116.397428, 39.90923],--%>
            <%--clickable: true,--%>
            <%--});--%>
            <%--// 设置label标签--%>
            <%--// label默认蓝框白底左上角显示，样式className为：amap-marker-label--%>
            <%--oneMaker.setLabel({--%>
            <%--offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量--%>
            <%--content: "<div class='info'>什翁污水点</div>", //设置文本标注内容--%>
            <%--direction: 'bottom' //设置文本标注方位--%>
            <%--});--%>
            <%--var _onClick = function (e) {--%>
            <%--details();--%>
            <%--}--%>
            <%--AMap.event.addListener(oneMaker, 'click', _onClick);--%>


            <%--var oneMaker2 = new AMap.Marker({--%>
            <%--icon: "<%=request.getContextPath()%>/jsp/huazhi/layui/images/pointGreen2.png",--%>
            <%--map: map,--%>
            <%--position: [109.513434,18.686187],--%>
            <%--//                position:[116.397428, 39.90923],--%>
            <%--clickable: true,--%>
            <%--});--%>
            <%--// 设置label标签--%>
            <%--// label默认蓝框白底左上角显示，样式className为：amap-marker-label--%>
            <%--oneMaker2.setLabel({--%>
            <%--offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量--%>
            <%--content: "<div class='info'>番道污水点</div>", //设置文本标注内容--%>
            <%--direction: 'bottom' //设置文本标注方位--%>
            <%--});--%>
            <%--var _onClick2 = function (e) {--%>
            <%--details();--%>
            <%--}--%>
            <%--AMap.event.addListener(oneMaker2, 'click', _onClick2);--%>



            <%--var oneMaker3 = new AMap.Marker({--%>
            <%--icon: "<%=request.getContextPath()%>/jsp/huazhi/layui/images/pointRed2.png",--%>
            <%--map: map,--%>
            <%--position: [109.391211,18.722933],--%>
            <%--//                position:[116.397428, 39.90923],--%>
            <%--clickable: true,--%>
            <%--});--%>
            <%--// 设置label标签--%>
            <%--// label默认蓝框白底左上角显示，样式className为：amap-marker-label--%>
            <%--oneMaker3.setLabel({--%>
            <%--offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量--%>
            <%--content: "<div class='info'>红沟村污水点</div>", //设置文本标注内容--%>
            <%--direction: 'bottom' //设置文本标注方位--%>
            <%--});--%>
            <%--var _onClick3 = function (e) {--%>
            <%--details();--%>
            <%--}--%>
            <%--AMap.event.addListener(oneMaker3, 'click', _onClick3);--%>


            <%--var oneMaker4 = new AMap.Marker({--%>
            <%--icon: "<%=request.getContextPath()%>/jsp/huazhi/layui/images/pointGreen2.png",--%>
            <%--map: map,--%>
            <%--position: [109.646471,18.781939],--%>
            <%--//                position:[116.397428, 39.90923],--%>
            <%--clickable: true,--%>
            <%--});--%>
            <%--// 设置label标签--%>
            <%--// label默认蓝框白底左上角显示，样式className为：amap-marker-label--%>
            <%--oneMaker4.setLabel({--%>
            <%--offset: new AMap.Pixel(0, 0),  //设置文本标注偏移量--%>
            <%--content: "<div class='info'>军民村污水点</div>", //设置文本标注内容--%>
            <%--direction: 'bottom' //设置文本标注方位--%>
            <%--});--%>
            <%--var _onClick4 = function (e) {--%>
            <%--details();--%>
            <%--}--%>
            <%--AMap.event.addListener(oneMaker4, 'click', _onClick4);--%>


        }

        function openCCTV(videotid, videoUrl,cun) {
            layui.layer.open({
                title: cun+"污水实时监控",
                type: 2,
                area: ['100%', '100%'],
                content: '<%=request.getContextPath()%>/huazhi/js/lay-module/OpenCctv.jsp',
                shade: 0.8,
                anim: 4,
                skin: 'layui-layer-molv',
                resize: true,
                move: false,
                maxmin: true,
                success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面
                    var iframe = window['layui-layer-iframe' + index];
                    iframe.child(videotid, videoUrl);
                }
            });
        }

        function opens(){
            layui.layer.open({
                title: "污水处理点分布地图 ",
                type: 2,
                area: ['100%', '100%'],
                content: '<%=request.getContextPath()%>/rest/getRoute?type=mian&url=map',
                shade: 0.6,
                anim: 4,
                skin: 'layui-layer-molv',
                resize: true,
                move: false,
                maxmin: true,

                success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面

                }
            });
            $('.layui-layer-setwin .layui-layer-max').css("display", "none")
            $('.layui-layer-setwin .layui-layer-min').css("display", "none")
        }


        function leader(){
            var index =layer.open({
                title: "大屏BI数据可视化",
                type: 2,
                area: ['100%', '100%'],
                content: '<%=request.getContextPath()%>/rest/getRoute?type=bi&url=bi_list',
                shade: 0.6,
                anim: 4,
                skin: 'layui-layer-molv',
                resize: false,
                move: false,
                maxmin: true
            });
            layer.full(index);
        }


        function details(cun,videotid, videoUrl) {
            layui.layer.open({
                title: cun+"污水实时监控",
                type: 2,
                area: ['90%', '90%'],
                content: '<%=request.getContextPath()%>/rest/getRoute?type=mian&url=sewage_info',
                shade: 0.8,
                anim: 4,
                skin: 'layui-layer-molv',
                resize: true,
                move: false,
                maxmin: true,
                success: function (layero, index) {  //当你需要在层创建完毕时即执行一些语句，可以通过该回调 想相当于吧值转到子界面
//                    var body = layer.getChildFrame('body',index);//建立父子联系  //当你试图在当前页获取iframe页的DOM元素时，你可以用此方法。
//                    alert(videoTid+" "+videoUrl)
//                    body.find("#videoTid").val(videoTid);
//                    body.find("#videoUrl").val(videoUrl);
                    var iframe = window['layui-layer-iframe' + index];
                    iframe.child(videotid, videoUrl);

                }
            });
//            var vUrl = $('#video').data('url'),
//                videoObject = {
//                    container: '#video',
//                    loop: true,
//                    autoplay: true,
//                    video: [
//                        [vUrl, 'video/mp4']
//                    ]
//                };
//            var player = new ckplayer(videoObject);

        }

    </script>

</body>

</html>
<%--+--%>
